package com.atguigu.eud_teacher.service.impl;

import com.atguigu.eud_teacher.dao.CourseDescriptionDao;
import com.atguigu.eud_teacher.entity.ChapterEntity;
import com.atguigu.eud_teacher.entity.CourseDescriptionEntity;
import com.atguigu.eud_teacher.service.CourseDescriptionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;


@Service("courseDescriptionService")
public class CourseDescriptionServiceImpl extends ServiceImpl<CourseDescriptionDao, CourseDescriptionEntity> implements CourseDescriptionService {

    @Resource
    private CourseDescriptionDao courseDescriptionDao;

    @Override
    public void removeCourseDescriptionByCourseId(String courseId) {
        QueryWrapper<CourseDescriptionEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id", courseId);
        courseDescriptionDao.delete(queryWrapper);
    }
}